﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Pout_Porri.Objects.Interface;
using Pout_Porri.Utils;

namespace Pout_Porri.Objects
{
    class BarHole : Enemy
    {
        private Animation barraHoleStand;
    
        public BarHole(Texture2D image, Vector2 position, Vector2 velocity,
                        float Zorder) : base(image, position, velocity)
        {
            this.Mass = 0;
            this.setGrounded(false);
            this.texture = image;
            this.zOrder = Zorder;
            
        }

        public override void configAnimations()
        {
            barraHoleStand = new Animation("barraHoleStand", new Vector2(this.texture.Width, this.texture.Height), 100, 0, 0, 1, Axis.X);
            this.addAnimation(barraHoleStand);
            
            this.spriteTexture = new Texture2D(Game1.graphics.GraphicsDevice, this.texture.Width, this.texture.Height);

            this.setCurrentAnimation("barraHoleStand");
            currentState = EnemyStates.stand;
        }

        public void setRotation(float valor)
        {
            this.rotation = valor;
        }

        
        public override void update(GameTime gameTime)
        {
            
            if (currentState == EnemyStates.stand)
            {
                this.setCurrentAnimation("barraHoleStand");
                this.currentAnimationRect = this.AnimationRect(barraHoleStand);
            }

            base.update(gameTime);
        }


    }
}
